<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts: cordic/make_cordic/cordic2c.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">ESP8266ILI9341DisplayProject</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_a674585e0fd636fbc3b91e5f7b647f01.html">cordic</a></li><li class="navelem"><a class="el" href="dir_b4fe85498f5824264b0b14f7e0b1d310.html">make_cordic</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">cordic2c.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;stdio.h&gt;</code><br />
<code>#include &lt;stdlib.h&gt;</code><br />
<code>#include &lt;string.h&gt;</code><br />
<code>#include &lt;math.h&gt;</code><br />
<code>#include &lt;<a class="el" href="time_8h_source.html">time.h</a>&gt;</code><br />
<code>#include &lt;unistd.h&gt;</code><br />
<code>#include &lt;libgen.h&gt;</code><br />
</div>
<p><a href="cordic2c_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ad0c9c86596235ca7b3e113b12aeeafa0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic2c_8c.html#ad0c9c86596235ca7b3e113b12aeeafa0">Cordic_T_Bits</a>&#160;&#160;&#160;(int)(sizeof(<a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a>) &lt;&lt; 3)</td></tr>
<tr class="separator:ad0c9c86596235ca7b3e113b12aeeafa0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a867ec3a5cd66a315ef2c1ad6b54ee9b2"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic2c_8c.html#a867ec3a5cd66a315ef2c1ad6b54ee9b2">FCordic_T_Bits</a>&#160;&#160;&#160;(int)(sizeof(<a class="el" href="cordic2c__inc_8h.html#a1ba532e6cdd503e97977432406864cdd">FCordic_T</a>) &lt;&lt; 3)</td></tr>
<tr class="separator:a867ec3a5cd66a315ef2c1ad6b54ee9b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77433404a778cb9a148b6db69eedea93"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic2c_8c.html#a77433404a778cb9a148b6db69eedea93">Cordic_T_FractionBits</a>&#160;&#160;&#160;(int)(<a class="el" href="cordic2c_8c.html#ad0c9c86596235ca7b3e113b12aeeafa0">Cordic_T_Bits</a> - 3 - 1)</td></tr>
<tr class="separator:a77433404a778cb9a148b6db69eedea93"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c5645f685b278110b72d4003b2aee52"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic2c_8c.html#a7c5645f685b278110b72d4003b2aee52">Cordic_T_STR</a>&#160;&#160;&#160;&quot;typedef int <a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a>;&quot;</td></tr>
<tr class="separator:a7c5645f685b278110b72d4003b2aee52"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27092bec667d3da85622cfa613527520"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic2c_8c.html#a27092bec667d3da85622cfa613527520">UCordic_T_STR</a>&#160;&#160;&#160;&quot;typedef unsigned int <a class="el" href="cordic2c__inc_8h.html#a0d2210939130fe06cdbba9248686fa03">UCordic_T</a>;&quot;</td></tr>
<tr class="separator:a27092bec667d3da85622cfa613527520"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a435917aacf957393509563ef16007425"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic2c_8c.html#a435917aacf957393509563ef16007425">FCordic_T_STR</a>&#160;&#160;&#160;&quot;typedef double <a class="el" href="cordic2c__inc_8h.html#a1ba532e6cdd503e97977432406864cdd">FCordic_T</a>;&quot;</td></tr>
<tr class="separator:a435917aacf957393509563ef16007425"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75d478dd9c919ea7ecf27cc49b9dab58"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic2c_8c.html#a75d478dd9c919ea7ecf27cc49b9dab58">Cordic_One</a>&#160;&#160;&#160;(1UL &lt;&lt; Cordic_T_FractionBits)</td></tr>
<tr class="separator:a75d478dd9c919ea7ecf27cc49b9dab58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b976fbfc7fdff42650fe0419698cabf"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic2c_8c.html#a4b976fbfc7fdff42650fe0419698cabf">Cordic_K</a>&#160;&#160;&#160;(<a class="el" href="cordic2c_8c.html#a75d478dd9c919ea7ecf27cc49b9dab58">Cordic_One</a> * 0.6072529350088812561694)</td></tr>
<tr class="separator:a4b976fbfc7fdff42650fe0419698cabf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a38f46d7f72ed48712304af6f64b896f2"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic2c_8c.html#a38f46d7f72ed48712304af6f64b896f2">Cordic_INVK</a>&#160;&#160;&#160;(<a class="el" href="cordic2c_8c.html#a75d478dd9c919ea7ecf27cc49b9dab58">Cordic_One</a> / 0.6072529350088812561694)</td></tr>
<tr class="separator:a38f46d7f72ed48712304af6f64b896f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77653d895effdbff8323975329805fc9"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic2c_8c.html#a77653d895effdbff8323975329805fc9">Cordic_KP</a>&#160;&#160;&#160;(<a class="el" href="cordic2c_8c.html#a75d478dd9c919ea7ecf27cc49b9dab58">Cordic_One</a> * 1.20749706776307212887772)</td></tr>
<tr class="separator:a77653d895effdbff8323975329805fc9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a01817682b78da8cc004b6f0e9dd0d889"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic2c_8c.html#a01817682b78da8cc004b6f0e9dd0d889">Cordic_INVKP</a>&#160;&#160;&#160;(<a class="el" href="cordic2c_8c.html#a75d478dd9c919ea7ecf27cc49b9dab58">Cordic_One</a> * 1/1.20749706776307212887772)</td></tr>
<tr class="separator:a01817682b78da8cc004b6f0e9dd0d889"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b436217d30824e9004f1e16d33abf0a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic2c_8c.html#a1b436217d30824e9004f1e16d33abf0a">Cordic_HalfPI</a>&#160;&#160;&#160;((<a class="el" href="cordic2c__inc_8h.html#a0d2210939130fe06cdbba9248686fa03">UCordic_T</a>) (<a class="el" href="cordic2c_8c.html#a75d478dd9c919ea7ecf27cc49b9dab58">Cordic_One</a> * M_PI_2) )</td></tr>
<tr class="separator:a1b436217d30824e9004f1e16d33abf0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a20ea29e123c9dc91c52635b0ffee975d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic2c_8c.html#a20ea29e123c9dc91c52635b0ffee975d">Cordic2FP</a>(a)&#160;&#160;&#160;( (double) (a) / (double) (<a class="el" href="cordic2c_8c.html#a75d478dd9c919ea7ecf27cc49b9dab58">Cordic_One</a>))</td></tr>
<tr class="separator:a20ea29e123c9dc91c52635b0ffee975d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad614e1a545ad0fd263ea0afb0456cb7a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic2c_8c.html#ad614e1a545ad0fd263ea0afb0456cb7a">FP2Cordic</a>(a)&#160;&#160;&#160;((<a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a>) (<a class="el" href="cordic2c_8c.html#a75d478dd9c919ea7ecf27cc49b9dab58">Cordic_One</a> * (a)))</td></tr>
<tr class="separator:ad614e1a545ad0fd263ea0afb0456cb7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a97ad155ac7434ee543385126cd1d3313"><td class="memItemLeft" align="right" valign="top">typedef int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic2c_8c.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a></td></tr>
<tr class="memdesc:a97ad155ac7434ee543385126cd1d3313"><td class="mdescLeft">&#160;</td><td class="mdescRight">cordicC.c &ndash; J. Pitts Jarvis, III cordicC.c computes CORDIC constants and exercises the basic algorithms. Represents all numbers in fixed point notation. 1 bit sign, Cordic_T_Bits-1-n bit integral part, and n bit fractional part. n=29 lets us represent numbers in the interval [-4, 4) in 32 bit Cordic_T. Two's complement arithmetic is operative here.  <a href="#a97ad155ac7434ee543385126cd1d3313">More...</a><br /></td></tr>
<tr class="separator:a97ad155ac7434ee543385126cd1d3313"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d2210939130fe06cdbba9248686fa03"><td class="memItemLeft" align="right" valign="top">typedef unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic2c_8c.html#a0d2210939130fe06cdbba9248686fa03">UCordic_T</a></td></tr>
<tr class="separator:a0d2210939130fe06cdbba9248686fa03"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ba532e6cdd503e97977432406864cdd"><td class="memItemLeft" align="right" valign="top">typedef double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic2c_8c.html#a1ba532e6cdd503e97977432406864cdd">FCordic_T</a></td></tr>
<tr class="separator:a1ba532e6cdd503e97977432406864cdd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a4bc7ca5cbf08837c18c54b7a754d7900"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic2c_8c.html#a4bc7ca5cbf08837c18c54b7a754d7900">get_date</a> ()</td></tr>
<tr class="memdesc:a4bc7ca5cbf08837c18c54b7a754d7900"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current date in a string.  <a href="#a4bc7ca5cbf08837c18c54b7a754d7900">More...</a><br /></td></tr>
<tr class="separator:a4bc7ca5cbf08837c18c54b7a754d7900"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3281e2a9f8144b206e9e782543ed8da6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic2c_8c.html#a3281e2a9f8144b206e9e782543ed8da6">dump_tables</a> (<a class="el" href="posix_8h.html#aed4dabeb9f7c518ded42f930a04abce8">FILE</a> *FO)</td></tr>
<tr class="memdesc:a3281e2a9f8144b206e9e782543ed8da6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create Cordic tables Normalize base number system to 1.0 == Cordic_One == PI/2 (90 degrees) Example .5 is 50 gradians or PI/4 This value as great advantages:  <a href="#a3281e2a9f8144b206e9e782543ed8da6">More...</a><br /></td></tr>
<tr class="separator:a3281e2a9f8144b206e9e782543ed8da6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc93093d0da5da783668ca27f859a2a7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic2c_8c.html#afc93093d0da5da783668ca27f859a2a7">PrintXYZ</a> (char *str)</td></tr>
<tr class="memdesc:afc93093d0da5da783668ca27f859a2a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Display X,Y,Z as floating point.  <a href="#afc93093d0da5da783668ca27f859a2a7">More...</a><br /></td></tr>
<tr class="separator:afc93093d0da5da783668ca27f859a2a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e686d8e990a05ea18655a368e6d1918"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic2c_8c.html#a9e686d8e990a05ea18655a368e6d1918">Circular</a> (<a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a> <a class="el" href="ili9341_8c.html#a12ad102c2d1e7e119fdc040b0c922c7e">x</a>, <a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a> <a class="el" href="ili9341_8c.html#afe490938209e0b6b15224c05a01f0b40">y</a>, <a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a> z)</td></tr>
<tr class="memdesc:a9e686d8e990a05ea18655a368e6d1918"><td class="mdescLeft">&#160;</td><td class="mdescRight">Main Cordic routine - used for basic trig and vector rotations.  <a href="#a9e686d8e990a05ea18655a368e6d1918">More...</a><br /></td></tr>
<tr class="separator:a9e686d8e990a05ea18655a368e6d1918"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa47551f0ba056c573807f6dfa1b09d2d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic2c_8c.html#aa47551f0ba056c573807f6dfa1b09d2d">cordit1</a> (<a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a> <a class="el" href="ili9341_8c.html#a12ad102c2d1e7e119fdc040b0c922c7e">x</a>, <a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a> <a class="el" href="ili9341_8c.html#afe490938209e0b6b15224c05a01f0b40">y</a>, <a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a> z, <a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a> vecmode)</td></tr>
<tr class="memdesc:aa47551f0ba056c573807f6dfa1b09d2d"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the circular method. One slight change from the other methods is the y &lt; vecmode test. this is to implement arcsin, otherwise it can be y &lt; 0 and you can compute arcsin from arctan using trig identities, so it is not essential.  <a href="#aa47551f0ba056c573807f6dfa1b09d2d">More...</a><br /></td></tr>
<tr class="separator:aa47551f0ba056c573807f6dfa1b09d2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6797cc1f28fd7c359145ea548dc302d0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic2c_8c.html#a6797cc1f28fd7c359145ea548dc302d0">asinCordic</a> (<a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a> a)</td></tr>
<tr class="memdesc:a6797cc1f28fd7c359145ea548dc302d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute ArcSine (a) Only works for |a| &lt; 0.98.  <a href="#a6797cc1f28fd7c359145ea548dc302d0">More...</a><br /></td></tr>
<tr class="separator:a6797cc1f28fd7c359145ea548dc302d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ddf1224851353fc92bfbff6f499fa97"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic2c_8c.html#a0ddf1224851353fc92bfbff6f499fa97">main</a> (int argc, char *argv[])</td></tr>
<tr class="memdesc:a0ddf1224851353fc92bfbff6f499fa97"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create C Cordic Tables and test the results.  <a href="#a0ddf1224851353fc92bfbff6f499fa97">More...</a><br /></td></tr>
<tr class="separator:a0ddf1224851353fc92bfbff6f499fa97"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a87f33f8b076298d511ca73b9e458a3ac"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic2c_8c.html#a87f33f8b076298d511ca73b9e458a3ac">v_atan</a> [<a class="el" href="cordic2c_8c.html#ad0c9c86596235ca7b3e113b12aeeafa0">Cordic_T_Bits</a>+1]</td></tr>
<tr class="separator:a87f33f8b076298d511ca73b9e458a3ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46b4b48ef8c0c01099eb3bcdde8aa8db"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic2c_8c.html#a46b4b48ef8c0c01099eb3bcdde8aa8db">X</a></td></tr>
<tr class="separator:a46b4b48ef8c0c01099eb3bcdde8aa8db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab746e677f466f17031e92ed577fc3c15"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic2c_8c.html#ab746e677f466f17031e92ed577fc3c15">Y</a></td></tr>
<tr class="separator:ab746e677f466f17031e92ed577fc3c15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3da94d1c83a43c30add6c05fbbe1f194"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cordic2c_8c.html#a3da94d1c83a43c30add6c05fbbe1f194">Z</a></td></tr>
<tr class="separator:a3da94d1c83a43c30add6c05fbbe1f194"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a20ea29e123c9dc91c52635b0ffee975d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define Cordic2FP</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">a</td><td>)</td>
          <td>&#160;&#160;&#160;( (double) (a) / (double) (<a class="el" href="cordic2c_8c.html#a75d478dd9c919ea7ecf27cc49b9dab58">Cordic_One</a>))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="cordic2c_8c_source.html#l00123">123</a> of file <a class="el" href="cordic2c_8c_source.html">cordic2c.c</a>.</p>

<p>Referenced by <a class="el" href="cordic2c_8c_source.html#l00128">get_date()</a>, and <a class="el" href="cordic2c_8c_source.html#l00200">PrintXYZ()</a>.</p>

</div>
</div>
<a class="anchor" id="a1b436217d30824e9004f1e16d33abf0a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define Cordic_HalfPI&#160;&#160;&#160;((<a class="el" href="cordic2c__inc_8h.html#a0d2210939130fe06cdbba9248686fa03">UCordic_T</a>) (<a class="el" href="cordic2c_8c.html#a75d478dd9c919ea7ecf27cc49b9dab58">Cordic_One</a> * M_PI_2) )</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="cordic2c_8c_source.html#l00122">122</a> of file <a class="el" href="cordic2c_8c_source.html">cordic2c.c</a>.</p>

<p>Referenced by <a class="el" href="cordic2c_8c_source.html#l00128">get_date()</a>.</p>

</div>
</div>
<a class="anchor" id="a38f46d7f72ed48712304af6f64b896f2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define Cordic_INVK&#160;&#160;&#160;(<a class="el" href="cordic2c_8c.html#a75d478dd9c919ea7ecf27cc49b9dab58">Cordic_One</a> / 0.6072529350088812561694)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="cordic2c_8c_source.html#l00119">119</a> of file <a class="el" href="cordic2c_8c_source.html">cordic2c.c</a>.</p>

<p>Referenced by <a class="el" href="cordic2c_8c_source.html#l00128">get_date()</a>.</p>

</div>
</div>
<a class="anchor" id="a01817682b78da8cc004b6f0e9dd0d889"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define Cordic_INVKP&#160;&#160;&#160;(<a class="el" href="cordic2c_8c.html#a75d478dd9c919ea7ecf27cc49b9dab58">Cordic_One</a> * 1/1.20749706776307212887772)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="cordic2c_8c_source.html#l00121">121</a> of file <a class="el" href="cordic2c_8c_source.html">cordic2c.c</a>.</p>

<p>Referenced by <a class="el" href="cordic2c_8c_source.html#l00128">get_date()</a>.</p>

</div>
</div>
<a class="anchor" id="a4b976fbfc7fdff42650fe0419698cabf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define Cordic_K&#160;&#160;&#160;(<a class="el" href="cordic2c_8c.html#a75d478dd9c919ea7ecf27cc49b9dab58">Cordic_One</a> * 0.6072529350088812561694)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="cordic2c_8c_source.html#l00118">118</a> of file <a class="el" href="cordic2c_8c_source.html">cordic2c.c</a>.</p>

<p>Referenced by <a class="el" href="cordic2c_8c_source.html#l00292">asinCordic()</a>, <a class="el" href="cordic2c_8c_source.html#l00128">get_date()</a>, and <a class="el" href="cordic2c_8c_source.html#l00317">main()</a>.</p>

</div>
</div>
<a class="anchor" id="a77653d895effdbff8323975329805fc9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define Cordic_KP&#160;&#160;&#160;(<a class="el" href="cordic2c_8c.html#a75d478dd9c919ea7ecf27cc49b9dab58">Cordic_One</a> * 1.20749706776307212887772)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="cordic2c_8c_source.html#l00120">120</a> of file <a class="el" href="cordic2c_8c_source.html">cordic2c.c</a>.</p>

<p>Referenced by <a class="el" href="cordic2c_8c_source.html#l00128">get_date()</a>.</p>

</div>
</div>
<a class="anchor" id="a75d478dd9c919ea7ecf27cc49b9dab58"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define Cordic_One&#160;&#160;&#160;(1UL &lt;&lt; Cordic_T_FractionBits)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="cordic2c_8c_source.html#l00117">117</a> of file <a class="el" href="cordic2c_8c_source.html">cordic2c.c</a>.</p>

<p>Referenced by <a class="el" href="cordic2c_8c_source.html#l00128">get_date()</a>.</p>

</div>
</div>
<a class="anchor" id="ad0c9c86596235ca7b3e113b12aeeafa0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define Cordic_T_Bits&#160;&#160;&#160;(int)(sizeof(<a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a>) &lt;&lt; 3)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="cordic2c_8c_source.html#l00102">102</a> of file <a class="el" href="cordic2c_8c_source.html">cordic2c.c</a>.</p>

<p>Referenced by <a class="el" href="cordic2c_8c_source.html#l00128">get_date()</a>.</p>

</div>
</div>
<a class="anchor" id="a77433404a778cb9a148b6db69eedea93"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define Cordic_T_FractionBits&#160;&#160;&#160;(int)(<a class="el" href="cordic2c_8c.html#ad0c9c86596235ca7b3e113b12aeeafa0">Cordic_T_Bits</a> - 3 - 1)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="cordic2c_8c_source.html#l00105">105</a> of file <a class="el" href="cordic2c_8c_source.html">cordic2c.c</a>.</p>

<p>Referenced by <a class="el" href="cordic2c_8c_source.html#l00216">Circular()</a>, <a class="el" href="cordic2c_8c_source.html#l00259">cordit1()</a>, and <a class="el" href="cordic2c_8c_source.html#l00128">get_date()</a>.</p>

</div>
</div>
<a class="anchor" id="a7c5645f685b278110b72d4003b2aee52"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define Cordic_T_STR&#160;&#160;&#160;&quot;typedef int <a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a>;&quot;</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="cordic2c_8c_source.html#l00107">107</a> of file <a class="el" href="cordic2c_8c_source.html">cordic2c.c</a>.</p>

<p>Referenced by <a class="el" href="cordic2c_8c_source.html#l00128">get_date()</a>.</p>

</div>
</div>
<a class="anchor" id="a867ec3a5cd66a315ef2c1ad6b54ee9b2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FCordic_T_Bits&#160;&#160;&#160;(int)(sizeof(<a class="el" href="cordic2c__inc_8h.html#a1ba532e6cdd503e97977432406864cdd">FCordic_T</a>) &lt;&lt; 3)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="cordic2c_8c_source.html#l00103">103</a> of file <a class="el" href="cordic2c_8c_source.html">cordic2c.c</a>.</p>

<p>Referenced by <a class="el" href="cordic2c_8c_source.html#l00128">get_date()</a>.</p>

</div>
</div>
<a class="anchor" id="a435917aacf957393509563ef16007425"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FCordic_T_STR&#160;&#160;&#160;&quot;typedef double <a class="el" href="cordic2c__inc_8h.html#a1ba532e6cdd503e97977432406864cdd">FCordic_T</a>;&quot;</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="cordic2c_8c_source.html#l00109">109</a> of file <a class="el" href="cordic2c_8c_source.html">cordic2c.c</a>.</p>

<p>Referenced by <a class="el" href="cordic2c_8c_source.html#l00128">get_date()</a>.</p>

</div>
</div>
<a class="anchor" id="ad614e1a545ad0fd263ea0afb0456cb7a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FP2Cordic</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">a</td><td>)</td>
          <td>&#160;&#160;&#160;((<a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a>) (<a class="el" href="cordic2c_8c.html#a75d478dd9c919ea7ecf27cc49b9dab58">Cordic_One</a> * (a)))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="cordic2c_8c_source.html#l00124">124</a> of file <a class="el" href="cordic2c_8c_source.html">cordic2c.c</a>.</p>

<p>Referenced by <a class="el" href="cordic2c_8c_source.html#l00317">main()</a>.</p>

</div>
</div>
<a class="anchor" id="a27092bec667d3da85622cfa613527520"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UCordic_T_STR&#160;&#160;&#160;&quot;typedef unsigned int <a class="el" href="cordic2c__inc_8h.html#a0d2210939130fe06cdbba9248686fa03">UCordic_T</a>;&quot;</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="cordic2c_8c_source.html#l00108">108</a> of file <a class="el" href="cordic2c_8c_source.html">cordic2c.c</a>.</p>

<p>Referenced by <a class="el" href="cordic2c_8c_source.html#l00128">get_date()</a>.</p>

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="a97ad155ac7434ee543385126cd1d3313"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef int <a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>cordicC.c &ndash; J. Pitts Jarvis, III cordicC.c computes CORDIC constants and exercises the basic algorithms. Represents all numbers in fixed point notation. 1 bit sign, Cordic_T_Bits-1-n bit integral part, and n bit fractional part. n=29 lets us represent numbers in the interval [-4, 4) in 32 bit Cordic_T. Two's complement arithmetic is operative here. </p>
<p><em>IMPLEMENTING CORDIC ALGORITHMS</em> by Pitts Jarvis Cordic algorithm identities for circular functions starting with [x, y, z] and then driving z to 0 gives: [P*(x*cos(z)-y*sin(z)), P*(y*cos(z)+x*sin(z)), 0] driving y to 0 gives: [P*sqrt(x^2+y^2), 0, z+atan(y/x)] where K = 1/P = sqrt(1+1)* . . . <em>sqrt(1+(2^(-2*i))) special cases which compute interesting functions sin, cos [K, 0, a] -&gt; [cos(a), sin(a), 0] atan [1, a, 0] -&gt; [sqrt(1+a^2)/K, 0, atan(a)] [x, y, 0] -&gt; [sqrt(x^2+y^2)/K, 0, atan(y/x)] for hyperbolic functions, starting with [x, y, z] and then driving z to 0 gives: [P</em>(x*cosh(z)+y*sinh(z)), P*(y*cosh(z)+x*sinh(z)), 0] driving y to 0 gives: [P*sqrt(x^2-y^2), 0, z+atanh(y/x)] where K = 1/P = sqrt(1-(1/2)^2)* . . . <em>sqrt(1-(2^(-2*i))) sinh, cosh [K, 0, a] -&gt; [cosh(a), sinh(a), 0] exponential [K, K, a] -&gt; [e^a, e^a, 0] atanh [1, a, 0] -&gt; [sqrt(1-a^2)/K, 0, atanh(a)] [x, y, 0] -&gt; [sqrt(x^2-y^2)/K, 0, atanh(y/x)] ln [a+1, a-1, 0] -&gt; [2*sqrt(a)/K, 0, ln(a)/2] sqrt [a+(K/2)^2, a-(K/2)^2, 0] -&gt; [sqrt(a), 0, ln(a</em>(2/K)^2)/2] sqrt, ln [a+(K/2)^2, a-(K/2)^2, -ln(K/2)] -&gt; [sqrt(a), 0, ln(a)/2] for linear functions, starting with [x, y, z] and then driving z to 0 gives: [x, y+x*z, 0] driving y to 0 gives: [x, 0, z+y/x] compute atan(x) and atanh(x) using infinite series atan(x) = x - x^3/3 + x^5/5 - x^7/7 + . . . for x^2 &lt; 1 atanh(x) = x + x^3/3 + x^5/5 + x^7/7 + . . . for x^2 &lt; 1 To calculate these functions to 32 bits of precision, pick terms[i] s.t. ((2^-i)^(terms[i]))/(terms[i]) &lt; 2^-32 For x &lt;= 2^(-11), atan(x) = atanh(x) = x with 32 bits of accuracy </p>

<p>Definition at line <a class="el" href="cordic2c_8c_source.html#l00097">97</a> of file <a class="el" href="cordic2c_8c_source.html">cordic2c.c</a>.</p>

</div>
</div>
<a class="anchor" id="a1ba532e6cdd503e97977432406864cdd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef double <a class="el" href="cordic2c__inc_8h.html#a1ba532e6cdd503e97977432406864cdd">FCordic_T</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="cordic2c_8c_source.html#l00099">99</a> of file <a class="el" href="cordic2c_8c_source.html">cordic2c.c</a>.</p>

</div>
</div>
<a class="anchor" id="a0d2210939130fe06cdbba9248686fa03"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef unsigned int <a class="el" href="cordic2c__inc_8h.html#a0d2210939130fe06cdbba9248686fa03">UCordic_T</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="cordic2c_8c_source.html#l00098">98</a> of file <a class="el" href="cordic2c_8c_source.html">cordic2c.c</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a6797cc1f28fd7c359145ea548dc302d0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a> asinCordic </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a>&#160;</td>
          <td class="paramname"><em>a</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Compute ArcSine (a) Only works for |a| &lt; 0.98. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>Sine </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ArcSine (a) </dd></dl>

<p>Definition at line <a class="el" href="cordic2c_8c_source.html#l00292">292</a> of file <a class="el" href="cordic2c_8c_source.html">cordic2c.c</a>.</p>

</div>
</div>
<a class="anchor" id="a9e686d8e990a05ea18655a368e6d1918"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Circular </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a>&#160;</td>
          <td class="paramname"><em>z</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Main Cordic routine - used for basic trig and vector rotations. </p>
<dl class="section see"><dt>See also</dt><dd><a href="http://en.wikipedia.org/wiki/CORDIC">http://en.wikipedia.org/wiki/CORDIC</a> </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">x</td><td>Cordik_K, out: Cos of z </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">y</td><td>0, out: Sin of z </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">z</td><td>fixed point version of angle </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="cordic2c_8c_source.html#l00216">216</a> of file <a class="el" href="cordic2c_8c_source.html">cordic2c.c</a>.</p>

<p>Referenced by <a class="el" href="cordic2c_8c_source.html#l00317">main()</a>.</p>

</div>
</div>
<a class="anchor" id="aa47551f0ba056c573807f6dfa1b09d2d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cordit1 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a>&#160;</td>
          <td class="paramname"><em>z</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a>&#160;</td>
          <td class="paramname"><em>vecmode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This is the circular method. One slight change from the other methods is the y &lt; vecmode test. this is to implement arcsin, otherwise it can be y &lt; 0 and you can compute arcsin from arctan using trig identities, so it is not essential. </p>
<dl class="section see"><dt>See also</dt><dd><a href="http://en.wikipedia.org/wiki/CORDIC">http://en.wikipedia.org/wiki/CORDIC</a> </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">x</td><td>in: Cordik_K, out: Cos of z </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">y</td><td>in: 0 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">z</td><td>in: 0 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">vecmode</td><td>arcsize value </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="cordic2c_8c_source.html#l00259">259</a> of file <a class="el" href="cordic2c_8c_source.html">cordic2c.c</a>.</p>

<p>Referenced by <a class="el" href="cordic2c_8c_source.html#l00292">asinCordic()</a>.</p>

</div>
</div>
<a class="anchor" id="a3281e2a9f8144b206e9e782543ed8da6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void dump_tables </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="posix_8h.html#aed4dabeb9f7c518ded42f930a04abce8">FILE</a> *&#160;</td>
          <td class="paramname"><em>FO</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create Cordic tables Normalize base number system to 1.0 == Cordic_One == PI/2 (90 degrees) Example .5 is 50 gradians or PI/4 This value as great advantages: </p>
<ul>
<li>integer part is small on the unit circle</li>
<li>integer part is the circle quadrant number (think range reductions)Dump Cordic C structure <dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">*FO</td><td>File handle to write tables to </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
</li>
</ul>

<p>Definition at line <a class="el" href="cordic2c_8c_source.html#l00153">153</a> of file <a class="el" href="cordic2c_8c_source.html">cordic2c.c</a>.</p>

<p>Referenced by <a class="el" href="cordic2c_8c_source.html#l00128">get_date()</a>, and <a class="el" href="cordic2c_8c_source.html#l00317">main()</a>.</p>

</div>
</div>
<a class="anchor" id="a4bc7ca5cbf08837c18c54b7a754d7900"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* get_date </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the current date in a string. </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="cordic2c_8c_source.html#l00128">128</a> of file <a class="el" href="cordic2c_8c_source.html">cordic2c.c</a>.</p>

<p>Referenced by <a class="el" href="cordic2c_8c_source.html#l00317">main()</a>.</p>

</div>
</div>
<a class="anchor" id="a0ddf1224851353fc92bfbff6f499fa97"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>argv</em>[]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create C Cordic Tables and test the results. </p>
<dl class="section return"><dt>Returns</dt><dd>0 </dd></dl>

<p>Definition at line <a class="el" href="cordic2c_8c_source.html#l00317">317</a> of file <a class="el" href="cordic2c_8c_source.html">cordic2c.c</a>.</p>

</div>
</div>
<a class="anchor" id="afc93093d0da5da783668ca27f859a2a7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PrintXYZ </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>str</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Display X,Y,Z as floating point. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">str</td><td>string header </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="cordic2c_8c_source.html#l00200">200</a> of file <a class="el" href="cordic2c_8c_source.html">cordic2c.c</a>.</p>

<p>Referenced by <a class="el" href="cordic2c_8c_source.html#l00317">main()</a>.</p>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a class="anchor" id="a87f33f8b076298d511ca73b9e458a3ac"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a> v_atan[<a class="el" href="cordic2c_8c.html#ad0c9c86596235ca7b3e113b12aeeafa0">Cordic_T_Bits</a>+1]</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="cordic2c_8c_source.html#l00112">112</a> of file <a class="el" href="cordic2c_8c_source.html">cordic2c.c</a>.</p>

<p>Referenced by <a class="el" href="cordic2c_8c_source.html#l00216">Circular()</a>, <a class="el" href="cordic2c_8c_source.html#l00259">cordit1()</a>, and <a class="el" href="cordic2c_8c_source.html#l00128">get_date()</a>.</p>

</div>
</div>
<a class="anchor" id="a46b4b48ef8c0c01099eb3bcdde8aa8db"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a> X</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="cordic2c_8c_source.html#l00113">113</a> of file <a class="el" href="cordic2c_8c_source.html">cordic2c.c</a>.</p>

<p>Referenced by <a class="el" href="cordic2c_8c_source.html#l00216">Circular()</a>, <a class="el" href="cordic2c_8c_source.html#l00259">cordit1()</a>, and <a class="el" href="cordic2c_8c_source.html#l00200">PrintXYZ()</a>.</p>

</div>
</div>
<a class="anchor" id="ab746e677f466f17031e92ed577fc3c15"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a> Y</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="cordic2c_8c_source.html#l00114">114</a> of file <a class="el" href="cordic2c_8c_source.html">cordic2c.c</a>.</p>

<p>Referenced by <a class="el" href="cordic2c_8c_source.html#l00216">Circular()</a>, <a class="el" href="cordic2c_8c_source.html#l00259">cordit1()</a>, and <a class="el" href="cordic2c_8c_source.html#l00200">PrintXYZ()</a>.</p>

</div>
</div>
<a class="anchor" id="a3da94d1c83a43c30add6c05fbbe1f194"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="cordic2c__inc_8h.html#a97ad155ac7434ee543385126cd1d3313">Cordic_T</a> Z</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="cordic2c_8c_source.html#l00115">115</a> of file <a class="el" href="cordic2c_8c_source.html">cordic2c.c</a>.</p>

<p>Referenced by <a class="el" href="cordic2c_8c_source.html#l00292">asinCordic()</a>, <a class="el" href="cordic2c_8c_source.html#l00216">Circular()</a>, <a class="el" href="cordic2c_8c_source.html#l00259">cordit1()</a>, and <a class="el" href="cordic2c_8c_source.html#l00200">PrintXYZ()</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Jan 31 2018 21:22:16 for ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
